<template>
  <div id="app">
    <div class="position-absolute left-0 right-0 top-0 bottom-0">
      <router-view v-if="isRouterAlive"></router-view>
    </div>
  </div>
</template>

<script>
export default {
  provide () {    //父组件中通过provide来提供变量，在子组件中通过inject来注入变量。                                             
		return {
      reload: this.reload                                              
		}
  },
  data(){
    return{
      isRouterAlive: true
    }
  },
  methods: {
		reload(){
			this.isRouterAlive = false;            //先关闭，
			this.$nextTick(() =>{
				this.isRouterAlive = true;         //再打开
			}) 
		}
	}
}
</script>

<style lang="less">
/*公共css */
	@import "./assets/css/iconfont.css";
	@import "./assets/css/common.css";
  @import "./assets/css/z-main.css";
  body{
    margin: 0;
    padding: 0;
    height: 100%;
  }
 .tox{
    z-index: 9999 !important;
  }
  p{margin: 0;padding: 0;}

  .drug-admin /deep/ .el-dialog__body{
      padding: 10px 20px!important;
  }
  .audit /deep/ .el-dialog__footer{
      text-align: center;
  }
</style>
